/**
 * @param {number[]} nums
 * @return {boolean}
 */
var increasingTriplet = function(nums) {
    if(nums.length<3)return false
    
    let sample = [nums.shift(0)]

    for(let i in nums){
        if(nums[i] > sample[0]){
            sample.push(nums[i])
            break
        }
    }

    for(let i in nums){
        let num = nums[i]
        console.log(num,sample,'num ')
        if(num <= sample[0]){
            sample[0] = num
        }else if(num > sample[1]){
            console.log("rrrrrr true")
            return true
        }else{
            sample[1] = num
        }
    }
    return false
};

// let s = increasingTriplet([5,4,3,2,1,7,9])

// console.log(s,"ssssssss")

